package cn.s1995.sloth.bizs.entity;

import cn.s1995.sloth.bizs.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付流水
 *
 * @author Lex
 * @date 2024-01-05 08:28:27
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "支付流水")
@TableName("biz_pay_flow")
public class PayFlow extends BaseEntity {


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private Long id;

	/**
	* 类型：1.订单 2.订单退款 3.充值 4.提现
	*/
    @Schema(description = "类型：1.订单 2.订单退款 3.充值 4.提现")
    private Integer payType;

	/**
	* 支付状态：0.未支付 1.已支付 -1.支付失败
	*/
    @Schema(description = "支付状态：0.未支付 1.已支付 -1.支付失败")
    private Integer payState;

	/**
	* 支付方式：1.微信支付 2.支付宝 3.手动代付 4.paypal 5.google 6.apple 7.stripe
	*/
    @Schema(description = "支付方式：1.微信支付 2.支付宝 3.手动代付 4.paypal 5.google 6.apple 7.stripe")
    private Integer payMethod;

	/**
	* 支付金额
	*/
    @Schema(description = "支付金额")
    private BigDecimal payAmount;

	/**
	* 用户id
	*/
    @Schema(description = "用户id")
    private Long uid;

	/**
	 * 流水号
	 */
	@Schema(description = "流水号")
	private String flowNo;

	/**
	* 订单id
	*/
    @Schema(description = "订单id")
    private Long orderId;

	/**
	 * 第三方交易id
	 */
	@Schema(description = "第三方交易id")
	private String transactionId;

	/**
	* 支付成功时间
	*/
    @Schema(description = "支付成功时间")
    private LocalDateTime paySuccTime;

	/**
	* 版本号
	*/
    @Schema(description = "版本号")
    private Integer version;

	/**
	* 渠道ID
	*/
    @Schema(description = "渠道ID")
    private String channelId;

	/**
	* 渠道商户号
	*/
    @Schema(description = "渠道商户号")
    private String channelMchId;

	/**
	* 币种
	*/
    @Schema(description = "币种")
    private String currency;

	/**
	* 客户端IP
	*/
    @Schema(description = "客户端IP")
    private String clientIp;

	/**
	* 设备信息
	*/
    @Schema(description = "设备信息")
    private String device;

	/**
	* 附加信息
	*/
    @Schema(description = "附加信息")
    private String extra;

	/**
	* 扩展参数1
	*/
    @Schema(description = "扩展参数1")
    private String param1;

	/**
	* 扩展参数2
	*/
    @Schema(description = "扩展参数2")
    private String param2;
}
